<?php
class news extends Controller{

    public function  __construct() {
        parent::Controller();
        $this->load->model('newsmodel','news');
    }

    public function show(){
        $id = intval($this->input->get('id'));
        if($news = $this->news->find($id)){
            $data['news'] = $news;
            $data['advisers'] = $this->db->get('adviser')->result();
            $this->load->view('news_show',$data);
        }else{
            show_404();
        }
    }
}